package com.wzy.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author : Zht
 * @create : 2021/2/18
 * @describe:
 */
public class ReadConst extends Properties {

    private static final long serialVersionUID = 1L;

    private static ReadConst instance;

    private ReadConst() {
        try {
            InputStream is = super.getClass().getResourceAsStream("/const.properties");
            super.load(is);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static synchronized ReadConst getInstance() {

        if (instance == null) {
            instance = new ReadConst();
        }

        return instance;
    }

}
